package com.zr.model;
// Generated 2016-10-26 14:56:45 by Hibernate Tools 4.3.1.Final

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * LMdistribution generated by hbm2java
 * 这是配送点的模型
 */
@Entity
@Table(name = "l_mdistribution", catalog = "logistical_managementcrm")
public class LMdistribution implements java.io.Serializable {

	private Integer did;
	private String dname;
	private Integer acting;//该配送点是否是代理点
	private String dtemp;//备用字段
	private Set<LMdistributionPrice> LMdistributionPrices = new HashSet<LMdistributionPrice>(0);
	private Set<LMreportForms> LMreportFormses = new HashSet<LMreportForms>(0);
	private Set<LMorder> LMorders = new HashSet<LMorder>(0);
	private Set<LMway> LMways = new HashSet<LMway>(0);
	private Set<LMdistributionRange> LMdistributionRanges = new HashSet<LMdistributionRange>(0);

	public LMdistribution() {
	}

	public LMdistribution(String dname, Integer acting, String dtemp, Set<LMdistributionPrice> LMdistributionPrices, Set<LMreportForms> LMreportFormses,
			Set<LMorder> LMorders, Set<LMway> LMways, Set<LMdistributionRange> LMdistributionRanges) {
		this.dname = dname;
		this.acting = acting;
		this.dtemp = dtemp;
		this.LMdistributionPrices = LMdistributionPrices;
		this.LMreportFormses = LMreportFormses;
		this.LMorders = LMorders;
		this.LMways = LMways;
		this.LMdistributionRanges = LMdistributionRanges;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "did", unique = true, nullable = false)
	public Integer getDid() {
		return this.did;
	}

	public void setDid(Integer did) {
		this.did = did;
	}

	@Column(name = "dname")
	public String getDname() {
		return this.dname;
	}

	public void setDname(String dname) {
		this.dname = dname;
	}

	@Column(name = "acting")
	public Integer getActing() {
		return this.acting;
	}

	public void setActing(Integer acting) {
		this.acting = acting;
	}

	@Column(name = "dtemp")
	public String getDtemp() {
		return this.dtemp;
	}

	public void setDtemp(String dtemp) {
		this.dtemp = dtemp;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "LMdistribution")
	public Set<LMdistributionPrice> getLMdistributionPrices() {
		return this.LMdistributionPrices;
	}

	public void setLMdistributionPrices(Set<LMdistributionPrice> LMdistributionPrices) {
		this.LMdistributionPrices = LMdistributionPrices;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "LMdistribution")
	public Set<LMreportForms> getLMreportFormses() {
		return this.LMreportFormses;
	}

	public void setLMreportFormses(Set<LMreportForms> LMreportFormses) {
		this.LMreportFormses = LMreportFormses;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "LMdistribution")
	public Set<LMorder> getLMorders() {
		return this.LMorders;
	}

	public void setLMorders(Set<LMorder> LMorders) {
		this.LMorders = LMorders;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "LMdistribution")
	public Set<LMway> getLMways() {
		return this.LMways;
	}

	public void setLMways(Set<LMway> LMways) {
		this.LMways = LMways;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "LMdistribution",cascade=CascadeType.ALL)
	public Set<LMdistributionRange> getLMdistributionRanges() {
		return this.LMdistributionRanges;
	}

	public void setLMdistributionRanges(Set<LMdistributionRange> LMdistributionRanges) {
		this.LMdistributionRanges = LMdistributionRanges;
	}

}
